package com.zhousc.springcloud;

import feign.Feign;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients
// 开启hystrix相关功能
@EnableCircuitBreaker
public class HystrixFallbackApp {

    public static void main(String[] args) {

        new SpringApplicationBuilder(HystrixFallbackApp.class).web(WebApplicationType.SERVLET)
                .run(args);
    }
}
